package com.zscat.mallplus.config;

import com.zscat.mallplus.util.Myquartz;
import org.quartz.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//这个类主要是做配置类去配置JobDetail，Trigger即配置工作明细，和触发器，
//定时任务配置类
@Configuration
public class QuartzConfig {
    @Bean
    public JobDetail jobDetail() {
        return JobBuilder.newJob(Myquartz.class).storeDurably().build();
    }


//    @Bean
//    public Trigger trigger() {
//        ScheduleBuilder schdule = CronScheduleBuilder.cronSchedule("0 05 00 * * ?");
//        //forJob就时绑定工作明细
//        return TriggerBuilder.newTrigger().forJob(jobDetail()).withSchedule(schdule).build();
//    }

}

